package biz

import "context"

type DataSet interface {
	Query(ctx context.Context, request *DataQueryRequest) (result *Result[*DataQueryResponse], err error)
	Subscribe(ctx context.Context, request *DataSubscribeRequest) (result *Result[*DataSubscribeResponse], err error)
	Unsubscribe(ctx context.Context, request *DataUnsubscribeRequest) (result *Result[*DataUnsubscribeResponse], err error)
	Push(ctx context.Context, data *DataFrame) (err error)
	Poll() *DataFrame
	Close()
}

type DataFrame struct {
	Ids   []string `json:"Ids"`
	Value string   `json:"Value"`
}

type DataQueryRequest struct {
	Type       string
	Parameters string
}

type DataQueryResponse struct {
	Data string
}

type DataSubscribeRequest struct {
	Type       string
	Parameters string
}

type DataSubscribeResponse struct {
	Id string
}

type DataUnsubscribeRequest struct {
	Id string
}

type DataUnsubscribeResponse struct {
}
